"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var express = require("express");
var redis = require("redis");
var redisClient = redis.createClient(6379, 'redis');
var counter = function () {
    return new Promise(function (resolve, reject) {
        redisClient.get('count', function (_, reply) {
            var value = reply ? parseInt(reply) + 1 : 1;
            redisClient.set('count', value.toString());
            resolve(value);
        });
    });
};
var app = express();
app.get('/', function (req, res) {
    counter().then(function (count) {
        res.send("Hello World!" + count);
    });
});
app.listen(3000, function () {
    console.log('App listen on port 3000!');
});
